package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShopGoodsMapper;
import com.ruoyi.system.domain.ShopGoods;
import com.ruoyi.system.service.IShopGoodsService;

/**
 * 商品信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-20
 */
@Service
public class ShopGoodsServiceImpl implements IShopGoodsService 
{
    @Autowired
    private ShopGoodsMapper shopGoodsMapper;

    /**
     * 查询商品信息
     * 
     * @param goodsId 商品信息主键
     * @return 商品信息
     */
    @Override
    public ShopGoods selectShopGoodsByGoodsId(Long goodsId)
    {
        return shopGoodsMapper.selectShopGoodsByGoodsId(goodsId);
    }

    /**
     * 查询商品信息列表
     * 
     * @param shopGoods 商品信息
     * @return 商品信息
     */
    @Override
    public List<ShopGoods> selectShopGoodsList(ShopGoods shopGoods)
    {
        return shopGoodsMapper.selectShopGoodsList(shopGoods);
    }

    /**
     * 新增商品信息
     * 
     * @param shopGoods 商品信息
     * @return 结果
     */
    @Override
    public int insertShopGoods(ShopGoods shopGoods)
    {
        return shopGoodsMapper.insertShopGoods(shopGoods);
    }

    /**
     * 修改商品信息
     * 
     * @param shopGoods 商品信息
     * @return 结果
     */
    @Override
    public int updateShopGoods(ShopGoods shopGoods)
    {
        return shopGoodsMapper.updateShopGoods(shopGoods);
    }

    /**
     * 批量删除商品信息
     * 
     * @param goodsIds 需要删除的商品信息主键
     * @return 结果
     */
    @Override
    public int deleteShopGoodsByGoodsIds(Long[] goodsIds)
    {
        return shopGoodsMapper.deleteShopGoodsByGoodsIds(goodsIds);
    }

    /**
     * 删除商品信息信息
     * 
     * @param goodsId 商品信息主键
     * @return 结果
     */
    @Override
    public int deleteShopGoodsByGoodsId(Long goodsId)
    {
        return shopGoodsMapper.deleteShopGoodsByGoodsId(goodsId);
    }
}
